Copyright: Copyright © 1996 RealSoft


Contents
Delphi Form Parser V1.0

What is a Delphi Form Parser?

Parsing a Form

How to Set Options

Using the Output Files in your Delphi programs

To register this software on Compuserve,

GO SWREG # 13150    $19.95 US

or, call (714) 831-7879

Copyright 1996  RealSoft Development


How to Set Options

STRING PROPS: (i.e. listbox items)

Allows you to choose whether to include TStrings

objects , or include them as a comment so you can

 decide later whether you want to use them.

BINARY PROPS: (i.e. glyphs, bitmaps)

Binary properties may be included or excluded.

Please note that binary properties are included

using a special format that can possibly make your

form-procedure get very long!

EVENTS: (i.e. OnClick)

Events can be included as a comment, as the

actual event procedures themselves will not

be included, and they could cause a compile

error if not added in later.  You can always

un-comment them after-the-fact.

TEXTHEIGHT (i.e. ???)

This property is included in a form part of the DFM

and we aren't sure why, as it does not compile.

You probably should not include it.

SHOWMODAL, FORMFREE

These options which default to true will place

code in your procedure to actually display and

free the form.  You can modify them later also.

NOTES:

There are special properties, especially for non-

visual components (i.e. OpenDialog), and custom

components that will not compile in your new procedure.

If your unit does not compile, simply delete the properties

that are giving you errors.. there are usually not very many.

Some adjustment may be necessary after the unit has been

tested.  Events and minor changes can be done directly

to the code very easily.


Parsing a Form

Using the form parser is very simple and

straightforward.

1.  Design a normal form in Delphi

2.  RUN the parser, and select

     OPEN DFM from the FILE menu, and locate the

     correct file.  This file will not be modified.

3.  Change any options (usually not required)

     see also Parse Options

4.  Select PARSE and TO UNIT or TO PROC

      a)  TO PROC will create a procedure that can be

           cut and pasted into your program

      b)  TO UNIT will create a procedure in a unit that

           can be included in the USES statement of your

           program and used as a separate unit.

5.  Parsing will take anywhere from 5 seconds to 2 minutes

     depending on the number of components.

     It may appear that the program has "locked up",

     but just be patient until the output appears.


Using the Output Files in your Delphi programs

When you have parsed a form, and are ready to use

it, you can cut and paste the procedure into your

program unit, --or-- if you have parsed to a unit, you

can add (after IMPLEMENTATION) a USES xxxxx

line, and access the procedure like any other.

You will find that the form procedure can be used like

any other form, except that changes or additions must

be made to the code instead of in the Delphi editor.

When distributing your custom components, your

customers will love the fact that there is no form

resource tagging along, and it provides a slick

appearance to your component's performance.

if you have any questions, or problems using this

program, please contact RealSoft.

Happy Parsing!


What is a Delphi Form Parser?

The form parser is of most use to a Delphi component

author.  You have probably received a new component

that needed a .DFM (form file) to go along with it.  You

may have also lost the DFM file, rendering the component

useless without it.

The alternative to including a DFM file when a form is

necessary is to create it "on the fly".  This can be a

tedious task, especially for a complex form, as you

must carefully create and place each component by

hand-coding it.  Updates can be equally unbearable.

The form parser takes care of everything for you.  You

can retain a normal form file outside of your project,

and the form parser will convert the entire form into

a single procedure that can be included in your

component, or Delphi project.  All standard Delphi

components, and their properties are successfully

converted into the raw code necessary to create them.

Most custom components will also be converted, although

some adjustments may be necessary for "strange"

properties.  To change your form procedure, simply

make changes to your original form file, and re-parse.

Another advantage to creating a form using a

procedure is speed--  The properties are set much

faster in a procedure than in a form resource.  You'll

probably find many more applications than we

did for a "form procedure"!